import { request } from '@/service/request';

/**
 * 列表
 */
export function saveSearchRecord(data: { searchValue: string }) {
  return request.post<void>('/admin/search/create', data, {
    useErrMsg: true
  });
}

/**
 * 列表
 */
export function listSearchRecord() {
  return request.get<Array<string>>('/admin/search/list', null, {
    useErrMsg: true
  });
}

/**
 * 删除
 */
export function clearSearchRecord() {
  return request.delete<void>('/admin/search/clear', null, {
    useErrMsg: true
  });
}
